//
//  LA.hpp
//  markerARLib
//
//  Created by fg on 16/5/6.
//  Copyright © 2016年 CvidKal. All rights reserved.
//

#ifndef LA_hpp
#define LA_hpp

#include <stdio.h>
#include <Eigen/Dense>

template<typename T1,typename T2>
inline void applyHomography(const Eigen::Matrix3d&H,T1 x1,T1 y1,T2 &x2,T2 &y2)
{
    double x3 = H(2,0)*x1+H(2,1)*y1+H(2,2);
    x2 = (H(0,0)*x1+H(0,1)*y1+H(0,2))/x3;
    y2 = (H(1,0)*x1+H(1,1)*y1+H(1,2))/x3;
    
}





#endif /* LA_hpp */
